package thread.processing;
import static java.lang.System.out;

/**
 * Thread.MAX_PRIORITY and Thread.MIN_PRIORITY
 * @author Shahid
 */

public class ThreadPriority {
  	
  	public static void main(String[] args) {
  		
		Ping ping = new Ping(500);
	    Pong pong = new Pong(500);
	
	    Thread t1 = new Thread(ping);
	    Thread t2 = new Thread(pong);	   
	    t1.setPriority(Thread.MAX_PRIORITY);
	    t2.setPriority(Thread.MIN_PRIORITY);  
	    
	    t1.start();t2.start();
	}
}

// Ping Pong Thread demo with Priority
// Sleep time of Ping = 500
// Sleep time of Pong = 500
// Ping1	Pong1	Ping2	Pong2	Ping3	Pong3	Ping4	Pong4	Pong5	Ping5	Pong6	Ping6	Pong7	Ping7	Pong8	Ping8	Pong9	Ping9	
